package com.hcbd.tdwt.ui.fuda.common.vo.weather;

/**
 * 灾害预警种类
 *
 * @author ZhDZ
 * @Date 2019年7月29日
 */
public enum DisasterWarnType {
    Hurricane(0x01, "台风"),
    Rainstorm(0x02, "暴雨"),
    Blizzard(0x03, "暴雪"),
    ColdWave(0x04, "寒潮"),
    Gale(0x05, "大风"),
    Duststorm(0x06, "沙尘暴"),
    HighHot(0x07, "高温"),
    Drought(0x08, "干旱"),
    Thunder(0x09, "雷电"),
    Hail(0x10, "冰雹"),
    Frost(0x11, "霜冻"),
    HeavyFog(0x12, "大雾"),
    Haze(0x13, "霾"),
    RoadIcing(0x14, "道路结冰"),
    Cold(0x15, "寒冷"),
    DustHaze(0x16, "灰霾"),
    ThunderGale(0x17, "雷雨大风"),
    ForestFire(0x18, "森林火险"),
    Hypothermia(0x19, "降温"),
    RoadSnow(0x20, "道路冰雪"),
    DryHotWind(0x21, "干热风"),
    Colding(0x22, "低温"),
    Frozen(0x23, "冰冻"),
    SeverePollution(0x24, "空气重污染"),
    SeaFog(0x25, "海上大雾"),
    ThunderstormGale(0x26, "雷暴大风"),
    ContinuousLowTemperature(0x27, "持续低温"),
    FloatingDust(0x28, "浓浮尘"),
    Tornado(0x29, "龙卷风"),
    FreezingInjury(0x30, "低温冻害"),
    SeaGale(0x31, "海上大风"),
    LowTempRainSnowIce(0x32, "低温雨雪冰冻"),
    StrongConvection(0x33, "强对流"),
    Ozone(0x34, "臭氧"),
    HeavySnow(0x35, "大雪"),
    HeavyRainfall(0x36, "强降雨"),
    StrongCooling(0x37, "强降温"),
    Snowstorm(0x38, "雪灾"),
    GrasslandFire(0x39, "森林（草原）火险"),
    Thunderstorm(0x40, "雷暴"),
    SevereCold(0x41, "严寒"),
    SandDust(0x42, "沙尘"),
    SeaThunderstormsGales(0x43, "海上雷雨大风"),
    SeaThunderstorms(0x44, "海上雷电"),
    SeaThunderGales(0x45, "海上台风");

    private int code;
    private String name;

    private DisasterWarnType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    public static DisasterWarnType get(int c) {
        for (DisasterWarnType w : DisasterWarnType.values()) {
            if (w.getCode() == c) {
                return w;
            }
        }
        return null;
    }

    public static DisasterWarnType get(String n) {
        for (DisasterWarnType w : DisasterWarnType.values()) {
            if (w.getName().equals(n)) {
                return w;
            }
        }
        return null;
    }


    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
